package com.bsoft.gol.hcs.satisfyStatic.entity;

import javax.persistence.*;

/**
 * 满意度调查统计报表管理拓展属性
 * Created by ChenJij on 2022/7/25.
 */
@Entity
@Table(name = "ods_satisfy_statistic_extra")
public class OdsSatisfyStatisticExtra {
    private String statisticExtraId;
    private String settingId;
    private String statisticExtraType;
    private String statisticExtraTypeName;
    private int sort;

    @Id
    @Column(name = "statistic_extra_id", nullable = false)
    public String getStatisticExtraId() {
        return statisticExtraId;
    }

    public void setStatisticExtraId(String statisticExtraId) {
        this.statisticExtraId = statisticExtraId;
    }

    @Basic
    @Column(name = "setting_id", nullable = false)
    public String getSettingId() {
        return settingId;
    }

    public void setSettingId(String settingId) {
        this.settingId = settingId;
    }

    @Basic
    @Column(name = "statistic_extra_type", nullable = false, length = 1)
    public String getStatisticExtraType() {
        return statisticExtraType;
    }

    public void setStatisticExtraType(String statisticExtraType) {
        this.statisticExtraType = statisticExtraType;
    }

    @Basic
    @Column(name = "statistic_extra_type_name", nullable = false, length = 36)
    public String getStatisticExtraTypeName() {
        return statisticExtraTypeName;
    }

    public void setStatisticExtraTypeName(String statisticExtraTypeName) {
        this.statisticExtraTypeName = statisticExtraTypeName;
    }

    @Basic
    @Column(name = "sort")
    public int getSort() {
        return sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof OdsSatisfyStatisticExtra)) return false;

        OdsSatisfyStatisticExtra that = (OdsSatisfyStatisticExtra) o;

        if (sort != that.sort) return false;
        if (statisticExtraId != null ? !statisticExtraId.equals(that.statisticExtraId) : that.statisticExtraId != null)
            return false;
        if (settingId != null ? !settingId.equals(that.settingId) : that.settingId != null) return false;
        if (statisticExtraType != null ? !statisticExtraType.equals(that.statisticExtraType) : that.statisticExtraType != null)
            return false;
        return statisticExtraTypeName != null ? statisticExtraTypeName.equals(that.statisticExtraTypeName) : that.statisticExtraTypeName == null;
    }

    @Override
    public int hashCode() {
        int result = statisticExtraId != null ? statisticExtraId.hashCode() : 0;
        result = 31 * result + (settingId != null ? settingId.hashCode() : 0);
        result = 31 * result + (statisticExtraType != null ? statisticExtraType.hashCode() : 0);
        result = 31 * result + (statisticExtraTypeName != null ? statisticExtraTypeName.hashCode() : 0);
        result = 31 * result + sort;
        return result;
    }
}